package com.tiger.cloud.enums;

import com.tiger.cloud.common.mybatis.handler.CodeEnum;

/**
 * 通用枚举类型
 */
public enum LoanRecordHowEnd implements CodeEnum<LoanRecordHowEnd> {

	COLLECTION(1, "收款中"), NORMAL_SETTLEMENT(2, "正常结清"), COLLECT_ACCOUNTS(3, "催收结清"), BAD_DEBT(4, "坏账"), UNCLEAR(5, "不清楚"),
	IMMOVABLE_PROPERTY(6, "不动产抵押");

	private int code;
	private String desc;

	private LoanRecordHowEnd(int code, String desc) {
		this.code = code;
	}

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static LoanRecordHowEnd getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (LoanRecordHowEnd enumm : LoanRecordHowEnd.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
    
	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
